import Router from 'koa-router'
import UserController from '@/api/UserController.js'
import CommentController from '@/api/CommentController'

const router = new Router({
  prefix: '/user'
})

router.get('/fav', UserController.userSign)
// 更新用户信息
router.post('/basic', UserController.updateUserInfo)
// 修改密码
router.post('/change-pass', UserController.changePass)

// 设置收藏
router.post('/collect', UserController.setCollect)

// 查询收藏
router.get('/collect', UserController.getCollect)

// 删除自己的帖子
router.delete('/post', UserController.deleteMyPost)

// 获取消息
router.get('/msg', CommentController.getUserMsg)
// 已读消息
router.post('/msg', CommentController.readUserMsg)

export default router
